#pragma once

#define cudnnCnnTrainVersionCheck                     mcdnnCnnTrainVersionCheck
#define cudnnConvolutionBackwardBias                  mcdnnConvolutionBackwardBias
#define cudnnConvolutionBackwardFilter                mcdnnConvolutionBackwardFilter
#define cudnnCreateFusedOpsConstParamPack             mcdnnCreateFusedOpsConstParamPack
#define cudnnCreateFusedOpsPlan                       mcdnnCreateFusedOpsPlan
#define cudnnCreateFusedOpsVariantParamPack           mcdnnCreateFusedOpsVariantParamPack
#define cudnnDestroyFusedOpsConstParamPack            mcdnnDestroyFusedOpsConstParamPack
#define cudnnDestroyFusedOpsPlan                      mcdnnDestroyFusedOpsPlan
#define cudnnDestroyFusedOpsVariantParamPack          mcdnnDestroyFusedOpsVariantParamPack
#define cudnnFindConvolutionBackwardFilterAlgorithm   mcdnnFindConvolutionBackwardFilterAlgorithm
#define cudnnFindConvolutionBackwardFilterAlgorithmEx mcdnnFindConvolutionBackwardFilterAlgorithmEx
#define cudnnFusedOpsExecute                          mcdnnFusedOpsExecute
#define cudnnGetConvolutionBackwardFilterAlgorithmMaxCount                                         \
    mcdnnGetConvolutionBackwardFilterAlgorithmMaxCount
#define cudnnGetConvolutionBackwardFilterAlgorithm_v7 mcdnnGetConvolutionBackwardFilterAlgorithm_v7
#define cudnnGetConvolutionBackwardFilterWorkspaceSize                                             \
    mcdnnGetConvolutionBackwardFilterWorkspaceSize
#define cudnnGetFusedOpsConstParamPackAttribute   mcdnnGetFusedOpsConstParamPackAttribute
#define cudnnGetFusedOpsVariantParamPackAttribute mcdnnGetFusedOpsVariantParamPackAttribute
#define cudnnMakeFusedOpsPlan                     mcdnnMakeFusedOpsPlan
#define cudnnSetFusedOpsConstParamPackAttribute   mcdnnSetFusedOpsConstParamPackAttribute
#define cudnnSetFusedOpsVariantParamPackAttribute mcdnnSetFusedOpsVariantParamPackAttribute

#define cudnnFusedOpsVariantParamLabel_t            mcdnnFusedOpsVariantParamLabel_t
#define CUDNN_PTR_XDATA                             MCDNN_PTR_XDATA
#define CUDNN_PTR_BN_EQSCALE                        MCDNN_PTR_BN_EQSCALE
#define CUDNN_PTR_BN_EQBIAS                         MCDNN_PTR_BN_EQBIAS
#define CUDNN_PTR_WDATA                             MCDNN_PTR_WDATA
#define CUDNN_PTR_DWDATA                            MCDNN_PTR_DWDATA
#define CUDNN_PTR_YDATA                             MCDNN_PTR_YDATA
#define CUDNN_PTR_DYDATA                            MCDNN_PTR_DYDATA
#define CUDNN_PTR_YSUM                              MCDNN_PTR_YSUM
#define CUDNN_PTR_YSQSUM                            MCDNN_PTR_YSQSUM
#define CUDNN_PTR_WORKSPACE                         MCDNN_PTR_WORKSPACE
#define CUDNN_PTR_BN_SCALE                          MCDNN_PTR_BN_SCALE
#define CUDNN_PTR_BN_BIAS                           MCDNN_PTR_BN_BIAS
#define CUDNN_PTR_BN_SAVED_MEAN                     MCDNN_PTR_BN_SAVED_MEAN
#define CUDNN_PTR_BN_SAVED_INVSTD                   MCDNN_PTR_BN_SAVED_INVSTD
#define CUDNN_PTR_BN_RUNNING_MEAN                   MCDNN_PTR_BN_RUNNING_MEAN
#define CUDNN_PTR_BN_RUNNING_VAR                    MCDNN_PTR_BN_RUNNING_VAR
#define CUDNN_PTR_ZDATA                             MCDNN_PTR_ZDATA
#define CUDNN_PTR_BN_Z_EQSCALE                      MCDNN_PTR_BN_Z_EQSCALE
#define CUDNN_PTR_BN_Z_EQBIAS                       MCDNN_PTR_BN_Z_EQBIAS
#define CUDNN_PTR_ACTIVATION_BITMASK                MCDNN_PTR_ACTIVATION_BITMASK
#define CUDNN_PTR_DXDATA                            MCDNN_PTR_DXDATA
#define CUDNN_PTR_DZDATA                            MCDNN_PTR_DZDATA
#define CUDNN_PTR_BN_DSCALE                         MCDNN_PTR_BN_DSCALE
#define CUDNN_PTR_BN_DBIAS                          MCDNN_PTR_BN_DBIAS
#define CUDNN_SCALAR_SIZE_T_WORKSPACE_SIZE_IN_BYTES MCDNN_SCALAR_SIZE_T_WORKSPACE_SIZE_IN_BYTES
#define CUDNN_SCALAR_INT64_T_BN_ACCUMULATION_COUNT  MCDNN_SCALAR_INT64_T_BN_ACCUMULATION_COUNT
#define CUDNN_SCALAR_DOUBLE_BN_EXP_AVG_FACTOR       MCDNN_SCALAR_DOUBLE_BN_EXP_AVG_FACTOR
#define CUDNN_SCALAR_DOUBLE_BN_EPSILON              MCDNN_SCALAR_DOUBLE_BN_EPSILON

#define cudnnFusedOpsPointerPlaceHolder_t mcdnnFusedOpsPointerPlaceHolder_t
#define CUDNN_PTR_NULL                    MCDNN_PTR_NULL
#define CUDNN_PTR_ELEM_ALIGNED            MCDNN_PTR_ELEM_ALIGNED
#define CUDNN_PTR_16B_ALIGNED             MCDNN_PTR_16B_ALIGNED

#define cudnnFusedOpsConstParamLabel_t             mcdnnFusedOpsConstParamLabel_t
#define CUDNN_PARAM_XDESC                          MCDNN_PARAM_XDESC
#define CUDNN_PARAM_XDATA_PLACEHOLDER              MCDNN_PARAM_XDATA_PLACEHOLDER
#define CUDNN_PARAM_BN_MODE                        MCDNN_PARAM_BN_MODE
#define CUDNN_PARAM_BN_EQSCALEBIAS_DESC            MCDNN_PARAM_BN_EQSCALEBIAS_DESC
#define CUDNN_PARAM_BN_EQSCALE_PLACEHOLDER         MCDNN_PARAM_BN_EQSCALE_PLACEHOLDER
#define CUDNN_PARAM_BN_EQBIAS_PLACEHOLDER          MCDNN_PARAM_BN_EQBIAS_PLACEHOLDER
#define CUDNN_PARAM_ACTIVATION_DESC                MCDNN_PARAM_ACTIVATION_DESC
#define CUDNN_PARAM_CONV_DESC                      MCDNN_PARAM_CONV_DESC
#define CUDNN_PARAM_WDESC                          MCDNN_PARAM_WDESC
#define CUDNN_PARAM_WDATA_PLACEHOLDER              MCDNN_PARAM_WDATA_PLACEHOLDER
#define CUDNN_PARAM_DWDESC                         MCDNN_PARAM_DWDESC
#define CUDNN_PARAM_DWDATA_PLACEHOLDER             MCDNN_PARAM_DWDATA_PLACEHOLDER
#define CUDNN_PARAM_YDESC                          MCDNN_PARAM_YDESC
#define CUDNN_PARAM_YDATA_PLACEHOLDER              MCDNN_PARAM_YDATA_PLACEHOLDER
#define CUDNN_PARAM_DYDESC                         MCDNN_PARAM_DYDESC
#define CUDNN_PARAM_DYDATA_PLACEHOLDER             MCDNN_PARAM_DYDATA_PLACEHOLDER
#define CUDNN_PARAM_YSTATS_DESC                    MCDNN_PARAM_YSTATS_DESC
#define CUDNN_PARAM_YSUM_PLACEHOLDER               MCDNN_PARAM_YSUM_PLACEHOLDER
#define CUDNN_PARAM_YSQSUM_PLACEHOLDER             MCDNN_PARAM_YSQSUM_PLACEHOLDER
#define CUDNN_PARAM_BN_SCALEBIAS_MEANVAR_DESC      MCDNN_PARAM_BN_SCALEBIAS_MEANVAR_DESC
#define CUDNN_PARAM_BN_SCALE_PLACEHOLDER           MCDNN_PARAM_BN_SCALE_PLACEHOLDER
#define CUDNN_PARAM_BN_BIAS_PLACEHOLDER            MCDNN_PARAM_BN_BIAS_PLACEHOLDER
#define CUDNN_PARAM_BN_SAVED_MEAN_PLACEHOLDER      MCDNN_PARAM_BN_SAVED_MEAN_PLACEHOLDER
#define CUDNN_PARAM_BN_SAVED_INVSTD_PLACEHOLDER    MCDNN_PARAM_BN_SAVED_INVSTD_PLACEHOLDER
#define CUDNN_PARAM_BN_RUNNING_MEAN_PLACEHOLDER    MCDNN_PARAM_BN_RUNNING_MEAN_PLACEHOLDER
#define CUDNN_PARAM_BN_RUNNING_VAR_PLACEHOLDER     MCDNN_PARAM_BN_RUNNING_VAR_PLACEHOLDER
#define CUDNN_PARAM_ZDESC                          MCDNN_PARAM_ZDESC
#define CUDNN_PARAM_ZDATA_PLACEHOLDER              MCDNN_PARAM_ZDATA_PLACEHOLDER
#define CUDNN_PARAM_BN_Z_EQSCALEBIAS_DESC          MCDNN_PARAM_BN_Z_EQSCALEBIAS_DESC
#define CUDNN_PARAM_BN_Z_EQSCALE_PLACEHOLDER       MCDNN_PARAM_BN_Z_EQSCALE_PLACEHOLDER
#define CUDNN_PARAM_BN_Z_EQBIAS_PLACEHOLDER        MCDNN_PARAM_BN_Z_EQBIAS_PLACEHOLDER
#define CUDNN_PARAM_ACTIVATION_BITMASK_DESC        MCDNN_PARAM_ACTIVATION_BITMASK_DESC
#define CUDNN_PARAM_ACTIVATION_BITMASK_DESC        MCDNN_PARAM_ACTIVATION_BITMASK_DESC
#define CUDNN_PARAM_ACTIVATION_BITMASK_PLACEHOLDER MCDNN_PARAM_ACTIVATION_BITMASK_PLACEHOLDER
#define CUDNN_PARAM_DXDESC                         MCDNN_PARAM_DXDESC
#define CUDNN_PARAM_DXDATA_PLACEHOLDER             MCDNN_PARAM_DXDATA_PLACEHOLDER
#define CUDNN_PARAM_DZDESC                         MCDNN_PARAM_DZDESC
#define CUDNN_PARAM_DZDATA_PLACEHOLDER             MCDNN_PARAM_DZDATA_PLACEHOLDER
#define CUDNN_PARAM_BN_DSCALE_PLACEHOLDER          MCDNN_PARAM_BN_DSCALE_PLACEHOLDER
#define CUDNN_PARAM_BN_DBIAS_PLACEHOLDER           MCDNN_PARAM_BN_DBIAS_PLACEHOLDER

#define cudnnFusedOps_t mcdnnFusedOps_t
#define CUDNN_FUSED_SCALE_BIAS_ACTIVATION_CONV_BNSTATS                                             \
    MCDNN_FUSED_SCALE_BIAS_ACTIVATION_CONV_BNSTATS
#define CUDNN_FUSED_SCALE_BIAS_ACTIVATION_WGRAD      MCDNN_FUSED_SCALE_BIAS_ACTIVATION_WGRAD
#define CUDNN_FUSED_BN_FINALIZE_STATISTICS_TRAINING  MCDNN_FUSED_BN_FINALIZE_STATISTICS_TRAINING
#define CUDNN_FUSED_BN_FINALIZE_STATISTICS_INFERENCE MCDNN_FUSED_BN_FINALIZE_STATISTICS_INFERENCE
#define CUDNN_FUSED_CONV_SCALE_BIAS_ADD_ACTIVATION   MCDNN_FUSED_CONV_SCALE_BIAS_ADD_ACTIVATION
#define CUDNN_FUSED_SCALE_BIAS_ADD_ACTIVATION_GEN_BITMASK                                          \
    MCDNN_FUSED_SCALE_BIAS_ADD_ACTIVATION_GEN_BITMASK
#define CUDNN_FUSED_DACTIVATION_FORK_DBATCHNORM MCDNN_FUSED_DACTIVATION_FORK_DBATCHNORM

#define cudnnConvolutionBwdFilterAlgoPerf_t     mcdnnConvolutionBwdFilterAlgoPerf_t
#define cudnnConvolutionBwdFilterAlgoPerfStruct mcdnnConvolutionBwdFilterAlgoPerf
#define cudnnFusedOpsConstParamPack_t           mcdnnFusedOpsConstParamPack_t
#define cudnnFusedOpsConstParamStruct           mcdnnFusedOpsConstParamPack
#define cudnnFusedOpsPlan_t                     mcdnnFusedOpsPlan_t
#define cudnnFusedOpsPlanStruct                 mcdnnFusedOpsPlan
#define cudnnFusedOpsVariantParamPack_t         mcdnnFusedOpsVariantParamPack_t
#define cudnnFusedOpsVariantParamStruct         mcdnnFusedOpsVariantParamPack
